package com.learn.xmls.aspects;

import org.aspectj.lang.ProceedingJoinPoint;

public class XmlAspect {

    public void before(String str){
        System.out.println("before: "+str);
    }

    public void after(String str){
        System.out.println("after: "+str);
    }

    public void afterReturning(String str, Object retVal){
        System.out.println("afterReturning: params="+str+" return="+retVal);
    }

    public void afterThrowing(String str, Exception ex){
        System.out.println("afterThrowing: param="+str+" exception="+ex.getMessage());
    }

    public Object around(ProceedingJoinPoint joinPoint, String str) throws Throwable {
        System.out.println("around before");
        Object obj = joinPoint.proceed();
        System.out.println("around after: "+obj);
        return obj;
    }
}
